package com.amrit.onetomany;

import java.util.Calendar;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

@Entity
@Table(name = "STATE")
public class State {

	@Id
	@Column(name = "State_Name")
	private String stateName;
	@Column(name = "State_Population")
	long statePopulation;
	
	@Temporal(TemporalType.TIMESTAMP)
	@Column (name ="Create_Date")
	private Calendar creationDate;

	public State() {	}

	public State(String stateName, long statePopulation, Calendar creationDate) {
		super();
		this.stateName = stateName;
		this.statePopulation = statePopulation;
		this.creationDate = creationDate;
	}

	public String getStateName() {
		return stateName;
	}

	public Calendar getCreationDate() {
		return creationDate;
	}

	public void setCreationDate(Calendar creationDate) {
		this.creationDate = creationDate;
	}

	public void setStateName(String stateName) {
		this.stateName = stateName;
	}

	public long getStatePopulation() {
		return statePopulation;
	}

	public void setStatePopulation(long statePopulation) {
		this.statePopulation = statePopulation;
	}
}